package com.j180.controller;

import Bean.StudentBean;
import com.j180.excepetion.MyException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping("/one")
    public String one() throws MyException {

        try {
            StudentBean studentBean =null;

            studentBean.getId()
            ;
        } catch (Exception e) {
            throw  new MyException("发生了空指针异常");
        }

        return "test/one";
    }
}
